<?php if(!defined('BASEPATH'))exit('No direct script access allowed'); ?>
<?php foreach($banners as $banner){ ?>
<?php if(trim($banner->banBanner) != ''){ ?>
<?php if(is_file(IMAGE_PATH.'banners/'.$banner->banDirBanner.'/'.$banner->banBanner)){ ?>
<?php if((int)$banner->banPosition == 1){ ?>
<div class="banner">
    <a href="<?php echo base_url(); ?>banner/<?php echo $banner->banID; ?>/<?php echo do_hash($this->input->ip_address(), $banner->banID); ?>" title="<?php echo $banner->banTitle; ?>" target="<?php echo $banner->banTarget; ?>">
        <?php if(strtoupper(substr(trim($banner->banBanner), -4)) != '.SWF'){ ?>
        <img src="<?php echo base_url().IMAGE_PATH.'banners/'.$banner->banDirBanner.'/'.$banner->banBanner; ?>" class="corner iradius6" width="248" height="215" alt="<?php echo $banner->banTitle; ?>" />
        <?php }else{ ?>
        <embed src="<?php echo base_url().IMAGE_PATH.'banners/'.$banner->banDirBanner.'/'.$banner->banBanner; ?>" width="248" height="215"></embed>
        <?php } ?>
    </a>
</div>
<?php }elseif((int)$banner->banPosition == 2 || (int)$banner->banPosition == 3){ ?>
<div class="banner739X100">
    <a href="<?php echo base_url(); ?>banner/<?php echo $banner->banID; ?>/<?php echo do_hash($this->input->ip_address(), $banner->banID); ?>" title="<?php echo $banner->banTitle; ?>" target="<?php echo $banner->banTarget; ?>">
        <?php if(strtoupper(substr(trim($banner->banBanner), -4)) != '.SWF'){ ?>
        <img src="<?php echo base_url().IMAGE_PATH.'banners/'.$banner->banDirBanner.'/'.$banner->banBanner; ?>" class="corner iradius6" width="739" height="100" alt="<?php echo $banner->banTitle; ?>" />
        <?php }else{ ?>
        <embed src="<?php echo base_url().IMAGE_PATH.'banners/'.$banner->banDirBanner.'/'.$banner->banBanner; ?>" width="739" height="100"></embed>
        <?php } ?>
    </a>
</div>
<?php }elseif((int)$banner->banPosition == 4){ ?>
<div class="left">
    <a href="<?php echo base_url(); ?>banner/<?php echo $banner->banID; ?>/<?php echo do_hash($this->input->ip_address(), $banner->banID); ?>" title="<?php echo $banner->banTitle; ?>" target="<?php echo $banner->banTarget; ?>">
        <?php if(strtoupper(substr(trim($banner->banBanner), -4)) != '.SWF'){ ?>
        <img src="<?php echo base_url().IMAGE_PATH.'banners/'.$banner->banDirBanner.'/'.$banner->banBanner; ?>" class="corner iradius6" width="367" height="100" alt="<?php echo $banner->banTitle; ?>" />
        <?php }else{ ?>
        <embed src="<?php echo base_url().IMAGE_PATH.'banners/'.$banner->banDirBanner.'/'.$banner->banBanner; ?>" width="367" height="100"></embed>
        <?php } ?>
    </a>
</div>
<?php }elseif((int)$banner->banPosition == 5){ ?>
<div class="right">
    <a href="<?php echo base_url(); ?>banner/<?php echo $banner->banID; ?>/<?php echo do_hash($this->input->ip_address(), $banner->banID); ?>" title="<?php echo $banner->banTitle; ?>" target="<?php echo $banner->banTarget; ?>">
        <?php if(strtoupper(substr(trim($banner->banBanner), -4)) != '.SWF'){ ?>
        <img src="<?php echo base_url().IMAGE_PATH.'banners/'.$banner->banDirBanner.'/'.$banner->banBanner; ?>" class="corner iradius6" width="367" height="100" alt="<?php echo $banner->banTitle; ?>" />
        <?php }else{ ?>
        <embed src="<?php echo base_url().IMAGE_PATH.'banners/'.$banner->banDirBanner.'/'.$banner->banBanner; ?>" width="367" height="100"></embed>
        <?php } ?>
    </a>
</div>
<?php }else{ ?>
<div class="banner236X100">
    <a href="<?php echo base_url(); ?>banner/<?php echo $banner->banID; ?>/<?php echo do_hash($this->input->ip_address(), $banner->banID); ?>" title="<?php echo $banner->banTitle; ?>" target="<?php echo $banner->banTarget; ?>">
        <?php if(strtoupper(substr(trim($banner->banBanner), -4)) != '.SWF'){ ?>
        <img src="<?php echo base_url().IMAGE_PATH.'banners/'.$banner->banDirBanner.'/'.$banner->banBanner; ?>" class="corner iradius6" width="236" height="100" alt="<?php echo $banner->banTitle; ?>" />
        <?php }else{ ?>
        <embed src="<?php echo base_url().IMAGE_PATH.'banners/'.$banner->banDirBanner.'/'.$banner->banBanner; ?>" width="236" height="100"></embed>
        <?php } ?>
    </a>
</div>
<?php } ?>
<?php } ?>
<?php }elseif(trim($banner->banCode) != ''){ ?>
<?php echo $banner->banCode; ?>
<?php } ?>
<?php } ?>